#define _CRT_SECURE_NO_WARNINGS 1
#include <string>
#include <vector>
using namespace std;
class Solution {
public:

    string formatString(string str, vector<char>& arg)
    {
        string ret;
        int j = 0;
        for (int i = 0;i < str.size();i++)
        {
            if (str[i] == '%')
            {
                i++;
                ret.push_back(arg[j++]);
            }
            else
            {
                ret.push_back(str[i]);
            }
        }
        for (;j < arg.size();j++)
        {
            ret.push_back(arg[j]);
        }
        return ret;
    }
};